package com.itheima.xiancheng.Demo5;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo5 {
    public static void main(String[] args) throws InterruptedException {
        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"正在执行");
        });
        Thread.sleep(1000);
        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"正在执行");
        });

    }
}
